<template>
  <div>
    <a-drawer
      :width="1200"
      :visible="visible"
      :maskClosable="true"
      @close="onClose"
      :destroyOnClose="true"
      :closable="false"
      :bodyStyle="{ padding: 0, background: '#f7f7f7', height: '100%' }"
    >
      <OwnerDetail showType="modal" :id="id" @cancel="onClose" @closeAllModal="closeAllModal"/>
    </a-drawer>
  </div>
</template>
<script>
import { defineComponent } from "vue";
import OwnerDetail from "../OwnerDetail.vue";

export default defineComponent({
  name: "OwnerDetailDrawer",
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    // 调取页面
    pageFrom: {
      type: String,
      default: "",
    },
    //   owener id
    id: {
      type: [Number, String],
      default: 0,
    },
  },
  components: { OwnerDetail },
  setup(props, { emit }) {
    const onClose = () => {
      emit("cancel");
    };

    const closeAllModal = () => {
      onClose();
      emit("closeAllModal")
    };
    return {
      onClose,
      closeAllModal,
    };
  },
});
</script>
